import request from '@/utils/request';

/************** 公司 */

// 获取动态表单
export function getDynamicForm(data) {
  return request({
    url: '/company/dynamic_form/get',
    method: 'post',
    data
  });
}

// 获取options
export function searchDynamicForm(data) {
  return request({
    url: '/company/dynamic_form/search',
    method: 'post',
    data
  });
}

// 检查表单内容是否正确
export function checkDynamicForm(data) {
  return request({
    url: '/company/dynamic_form/check',
    method: 'post',
    headers: { repeatSubmit: false },
    data
  });
}

// 单独更新某一行数据
export function dynamicFormRebuildingRow(data) {
  return request({
    url: '/company/dynamic_form/rebuilding_row',
    method: 'post',
    headers: { repeatSubmit: false },
    data
  });
}

// 创建vika表
export function companyApplicationBatchVika(data) {
  return request({
    url: '/company/application/batch/vika',
    method: 'post',
    data
  });
}

// 文件上传
export function companyApplicationBatchUpload(data) {
  return request({
    url: '/company/application/batch/upload',
    method: 'post',
    data
  });
}

// 校验批量申请
export function companyApplicationBatchCheck(data) {
  return request({
    url: '/company/application/batch/check',
    method: 'post',
    data
  });
}

// 使用接口添加字段内容
export function dynamicFormResetValues(data) {
  return request({
    url: '/company/dynamic_form/reset_values',
    method: 'post',
    data
  });
}

/************** 平台 */

// 获取动态表单-平台
export function getPlatformDynamicForm(data) {
  return request({
    url: '/platform/dynamic_form/get',
    method: 'post',
    data
  });
}

// 获取options
export function searchPlatformDynamicForm(data) {
  return request({
    url: '/platform/dynamic_form/search',
    method: 'post',
    data
  });
}

// 检查表单内容是否正确
export function checkPlatformDynamicForm(data) {
  return request({
    url: '/platform/dynamic_form/check',
    method: 'post',
    headers: { repeatSubmit: false },
    data
  });
}

// 单独更新某一行数据
export function dynamicPlatformFormRebuildingRow(data) {
  return request({
    url: '/platform/dynamic_form/rebuilding_row',
    method: 'post',
    headers: { repeatSubmit: false },
    data
  });
}

// 使用接口添加字段内容
export function dynamicPlatformFormResetValues(data) {
  return request({
    url: '/platform/dynamic_form/reset_values',
    method: 'post',
    data
  });
}
